namespace Digitalmes.Application.Services;

/// <summary>
/// 上料服务
/// </summary>
public interface IFeedingMaterialService : IApplicationService
{
    /// <summary>
    /// 检查产品在对应工序上的关键物料是否已全部录入。
    /// </summary>
    /// <param name="stepId">工艺步骤 Id</param>
    /// <param name="sn">SN</param>
    /// <param name="lineId">产线 Id</param>
    /// <param name="operationId">工序 Id</param>
    /// <returns></returns>
    Task<bool> CheckKeyMaterialDoneAsync(long stepId, string sn, long lineId, long operationId);

    /// <summary>
    /// 检查产品在对应工序上的批次物料并加载到耗料记录中。
    /// </summary>
    /// <param name="stepId">工艺步骤 Id</param>
    /// <param name="sn">SN</param>
    /// <param name="lineId">产线 Id</param>
    /// <param name="workstationId">工位 Id</param>
    /// <param name="operationId">工序 Id</param>
    /// <param name="operationCode">工序编号</param>
    /// <returns></returns>
    Task CheckAndLoadBatchMaterialAsync(long stepId, string sn, long lineId, long workstationId, long operationId, string operationCode);
}
